hysop.backend.device.opencl.autotunable_kernels.advection_dir module

class hysop.backend.device.opencl.autotunable_kernels.advection_dir.OpenClAutotunableDirectionalAdvectionKernel(cl_env, typegen, build_opts, autotuner_config, **kwds)[source]

Bases: OpenClAutotunableKernel

Autotunable interface for directional advection kernel code generators.

autotune(direction, time_integrator, velocity_cfl, velocity, position, relative_velocity, hardcode_arrays, is_bilevel, **kwds)[source]

Autotune this kernel with specified configuration.

compute_args_mapping(extra_kwds, extra_parameters)[source]

Return arguments mapping which is a dictionnary with arguments names as keys and tuples a values.

Tuples should contain (arg_position, arg_type(s)) with arg_position being an int and arg_type(s) a type or tuple of types which will be checked against.

compute_global_work_size(local_work_size, work, extra_parameters, extra_kwds)[source]

Compute aligned global_work_size from unaligned global_work_size and local_work_size. Input global_work_size may be None.

compute_min_max_wg_size(work_bounds, work_load, global_work_size, extra_parameters, extra_kwds)[source]

Default min and max workgroup size.

compute_parameters(extra_kwds)[source]

Register extra parameters to optimize.

generate_kernel_src(global_work_size, local_work_size, extra_parameters, extra_kwds, tuning_mode, dry_run)[source]

Generate kernel name and source code

hash_extra_kwds(extra_kwds)[source]

Hash extra_kwds dictionnary for caching purposes.